1 /* 2 * This file is part of gtkD. 3 * 4 * gtkD is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU Lesser General Public License 6 * as published by the Free Software Foundation; either version 3 7 * of the License, or (at your option) any later version, with 8 * some exceptions, please read the COPYING file. 9 * 10 * gtkD is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU Lesser General Public License for more details. 14 * 15 * You should have received a copy of the GNU Lesser General Public License 16 * along with gtkD; if not, write to the Free Software 17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA 18 */ 19 20 // generated automatically - do not change 21 // find conversion definition on APILookup.txt 22 // implement new conversion functionalities on the wrap.utils pakage 23 24 25 module rsvg.c.functions; 26 27 import std.stdio; 28 import rsvg.c.types; 29 import linker.Loader; 30 31 version (Windows) 32 static immutable LIBRARY_RSVG = ["librsvg-2-2.dll;rsvg-2-2.2.dll;rsvg-2.dll"]; 33 else version (OSX) 34 static immutable LIBRARY_RSVG = ["librsvg-2.2.dylib"]; 35 else 36 static immutable LIBRARY_RSVG = ["librsvg-2.so.2"]; 37 38 shared static this() 39 { 40 // rsvg.Handle 41 42 Linker.link(rsvg_handle_get_type, "rsvg_handle_get_type", LIBRARY_RSVG); 43 Linker.link(rsvg_handle_new, "rsvg_handle_new", LIBRARY_RSVG); 44 Linker.link(rsvg_handle_new_from_data, "rsvg_handle_new_from_data", LIBRARY_RSVG); 45 Linker.link(rsvg_handle_new_from_file, "rsvg_handle_new_from_file", LIBRARY_RSVG); 46 Linker.link(rsvg_handle_new_from_gfile_sync, "rsvg_handle_new_from_gfile_sync", LIBRARY_RSVG); 47 Linker.link(rsvg_handle_new_from_stream_sync, "rsvg_handle_new_from_stream_sync", LIBRARY_RSVG); 48 Linker.link(rsvg_handle_new_with_flags, "rsvg_handle_new_with_flags", LIBRARY_RSVG); 49 Linker.link(rsvg_handle_close, "rsvg_handle_close", LIBRARY_RSVG); 50 Linker.link(rsvg_handle_free, "rsvg_handle_free", LIBRARY_RSVG); 51 Linker.link(rsvg_handle_get_base_uri, "rsvg_handle_get_base_uri", LIBRARY_RSVG); 52 Linker.link(rsvg_handle_get_desc, "rsvg_handle_get_desc", LIBRARY_RSVG); 53 Linker.link(rsvg_handle_get_dimensions, "rsvg_handle_get_dimensions", LIBRARY_RSVG); 54 Linker.link(rsvg_handle_get_dimensions_sub, "rsvg_handle_get_dimensions_sub", LIBRARY_RSVG); 55 Linker.link(rsvg_handle_get_geometry_for_element, "rsvg_handle_get_geometry_for_element", LIBRARY_RSVG); 56 Linker.link(rsvg_handle_get_geometry_for_layer, "rsvg_handle_get_geometry_for_layer", LIBRARY_RSVG); 57 Linker.link(rsvg_handle_get_intrinsic_dimensions, "rsvg_handle_get_intrinsic_dimensions", LIBRARY_RSVG); 58 Linker.link(rsvg_handle_get_intrinsic_size_in_pixels, "rsvg_handle_get_intrinsic_size_in_pixels", LIBRARY_RSVG); 59 Linker.link(rsvg_handle_get_metadata, "rsvg_handle_get_metadata", LIBRARY_RSVG); 60 Linker.link(rsvg_handle_get_pixbuf, "rsvg_handle_get_pixbuf", LIBRARY_RSVG); 61 Linker.link(rsvg_handle_get_pixbuf_sub, "rsvg_handle_get_pixbuf_sub", LIBRARY_RSVG); 62 Linker.link(rsvg_handle_get_position_sub, "rsvg_handle_get_position_sub", LIBRARY_RSVG); 63 Linker.link(rsvg_handle_get_title, "rsvg_handle_get_title", LIBRARY_RSVG); 64 Linker.link(rsvg_handle_has_sub, "rsvg_handle_has_sub", LIBRARY_RSVG); 65 Linker.link(rsvg_handle_internal_set_testing, "rsvg_handle_internal_set_testing", LIBRARY_RSVG); 66 Linker.link(rsvg_handle_read_stream_sync, "rsvg_handle_read_stream_sync", LIBRARY_RSVG); 67 Linker.link(rsvg_handle_render_cairo, "rsvg_handle_render_cairo", LIBRARY_RSVG); 68 Linker.link(rsvg_handle_render_cairo_sub, "rsvg_handle_render_cairo_sub", LIBRARY_RSVG); 69 Linker.link(rsvg_handle_render_document, "rsvg_handle_render_document", LIBRARY_RSVG); 70 Linker.link(rsvg_handle_render_element, "rsvg_handle_render_element", LIBRARY_RSVG); 71 Linker.link(rsvg_handle_render_layer, "rsvg_handle_render_layer", LIBRARY_RSVG); 72 Linker.link(rsvg_handle_set_base_gfile, "rsvg_handle_set_base_gfile", LIBRARY_RSVG); 73 Linker.link(rsvg_handle_set_base_uri, "rsvg_handle_set_base_uri", LIBRARY_RSVG); 74 Linker.link(rsvg_handle_set_dpi, "rsvg_handle_set_dpi", LIBRARY_RSVG); 75 Linker.link(rsvg_handle_set_dpi_x_y, "rsvg_handle_set_dpi_x_y", LIBRARY_RSVG); 76 Linker.link(rsvg_handle_set_size_callback, "rsvg_handle_set_size_callback", LIBRARY_RSVG); 77 Linker.link(rsvg_handle_set_stylesheet, "rsvg_handle_set_stylesheet", LIBRARY_RSVG); 78 Linker.link(rsvg_handle_write, "rsvg_handle_write", LIBRARY_RSVG); 79 Linker.link(rsvg_cleanup, "rsvg_cleanup", LIBRARY_RSVG); 80 Linker.link(rsvg_set_default_dpi, "rsvg_set_default_dpi", LIBRARY_RSVG); 81 Linker.link(rsvg_set_default_dpi_x_y, "rsvg_set_default_dpi_x_y", LIBRARY_RSVG); 82 } 83 84 __gshared extern(C) 85 { 86 87 // rsvg.Handle 88 89 GType function() c_rsvg_handle_get_type; 90 RsvgHandle* function() c_rsvg_handle_new; 91 RsvgHandle* function(ubyte* data, size_t dataLen, GError** err) c_rsvg_handle_new_from_data; 92 RsvgHandle* function(const(char)* filename, GError** err) c_rsvg_handle_new_from_file; 93 RsvgHandle* function(GFile* file, RsvgHandleFlags flags, GCancellable* cancellable, GError** err) c_rsvg_handle_new_from_gfile_sync; 94 RsvgHandle* function(GInputStream* inputStream, GFile* baseFile, RsvgHandleFlags flags, GCancellable* cancellable, GError** err) c_rsvg_handle_new_from_stream_sync; 95 RsvgHandle* function(RsvgHandleFlags flags) c_rsvg_handle_new_with_flags; 96 int function(RsvgHandle* handle, GError** err) c_rsvg_handle_close; 97 void function(RsvgHandle* handle) c_rsvg_handle_free; 98 const(char)* function(RsvgHandle* handle) c_rsvg_handle_get_base_uri; 99 const(char)* function(RsvgHandle* handle) c_rsvg_handle_get_desc; 100 void function(RsvgHandle* handle, RsvgDimensionData* dimensionData) c_rsvg_handle_get_dimensions; 101 int function(RsvgHandle* handle, RsvgDimensionData* dimensionData, const(char)* id) c_rsvg_handle_get_dimensions_sub; 102 int function(RsvgHandle* handle, const(char)* id, RsvgRectangle* outInkRect, RsvgRectangle* outLogicalRect, GError** err) c_rsvg_handle_get_geometry_for_element; 103 int function(RsvgHandle* handle, const(char)* id, RsvgRectangle* viewport, RsvgRectangle* outInkRect, RsvgRectangle* outLogicalRect, GError** err) c_rsvg_handle_get_geometry_for_layer; 104 void function(RsvgHandle* handle, int* outHasWidth, RsvgLength* outWidth, int* outHasHeight, RsvgLength* outHeight, int* outHasViewbox, RsvgRectangle* outViewbox) c_rsvg_handle_get_intrinsic_dimensions; 105 int function(RsvgHandle* handle, double* outWidth, double* outHeight) c_rsvg_handle_get_intrinsic_size_in_pixels; 106 const(char)* function(RsvgHandle* handle) c_rsvg_handle_get_metadata; 107 GdkPixbuf* function(RsvgHandle* handle) c_rsvg_handle_get_pixbuf; 108 GdkPixbuf* function(RsvgHandle* handle, const(char)* id) c_rsvg_handle_get_pixbuf_sub; 109 int function(RsvgHandle* handle, RsvgPositionData* positionData, const(char)* id) c_rsvg_handle_get_position_sub; 110 const(char)* function(RsvgHandle* handle) c_rsvg_handle_get_title; 111 int function(RsvgHandle* handle, const(char)* id) c_rsvg_handle_has_sub; 112 void function(RsvgHandle* handle, int testing) c_rsvg_handle_internal_set_testing; 113 int function(RsvgHandle* handle, GInputStream* stream, GCancellable* cancellable, GError** err) c_rsvg_handle_read_stream_sync; 114 int function(RsvgHandle* handle, cairo_t* cr) c_rsvg_handle_render_cairo; 115 int function(RsvgHandle* handle, cairo_t* cr, const(char)* id) c_rsvg_handle_render_cairo_sub; 116 int function(RsvgHandle* handle, cairo_t* cr, RsvgRectangle* viewport, GError** err) c_rsvg_handle_render_document; 117 int function(RsvgHandle* handle, cairo_t* cr, const(char)* id, RsvgRectangle* elementViewport, GError** err) c_rsvg_handle_render_element; 118 int function(RsvgHandle* handle, cairo_t* cr, const(char)* id, RsvgRectangle* viewport, GError** err) c_rsvg_handle_render_layer; 119 void function(RsvgHandle* handle, GFile* baseFile) c_rsvg_handle_set_base_gfile; 120 void function(RsvgHandle* handle, const(char)* baseUri) c_rsvg_handle_set_base_uri; 121 void function(RsvgHandle* handle, double dpi) c_rsvg_handle_set_dpi; 122 void function(RsvgHandle* handle, double dpiX, double dpiY) c_rsvg_handle_set_dpi_x_y; 123 void function(RsvgHandle* handle, RsvgSizeFunc sizeFunc, void* userData, GDestroyNotify userDataDestroy) c_rsvg_handle_set_size_callback; 124 int function(RsvgHandle* handle, ubyte* css, size_t cssLen, GError** err) c_rsvg_handle_set_stylesheet; 125 int function(RsvgHandle* handle, char* buf, size_t count, GError** err) c_rsvg_handle_write; 126 void function() c_rsvg_cleanup; 127 void function(double dpi) c_rsvg_set_default_dpi; 128 void function(double dpiX, double dpiY) c_rsvg_set_default_dpi_x_y; 129 } 130 131 132 // rsvg.Handle 133 134 alias c_rsvg_handle_get_type rsvg_handle_get_type; 135 alias c_rsvg_handle_new rsvg_handle_new; 136 alias c_rsvg_handle_new_from_data rsvg_handle_new_from_data; 137 alias c_rsvg_handle_new_from_file rsvg_handle_new_from_file; 138 alias c_rsvg_handle_new_from_gfile_sync rsvg_handle_new_from_gfile_sync; 139 alias c_rsvg_handle_new_from_stream_sync rsvg_handle_new_from_stream_sync; 140 alias c_rsvg_handle_new_with_flags rsvg_handle_new_with_flags; 141 alias c_rsvg_handle_close rsvg_handle_close; 142 alias c_rsvg_handle_free rsvg_handle_free; 143 alias c_rsvg_handle_get_base_uri rsvg_handle_get_base_uri; 144 alias c_rsvg_handle_get_desc rsvg_handle_get_desc; 145 alias c_rsvg_handle_get_dimensions rsvg_handle_get_dimensions; 146 alias c_rsvg_handle_get_dimensions_sub rsvg_handle_get_dimensions_sub; 147 alias c_rsvg_handle_get_geometry_for_element rsvg_handle_get_geometry_for_element; 148 alias c_rsvg_handle_get_geometry_for_layer rsvg_handle_get_geometry_for_layer; 149 alias c_rsvg_handle_get_intrinsic_dimensions rsvg_handle_get_intrinsic_dimensions; 150 alias c_rsvg_handle_get_intrinsic_size_in_pixels rsvg_handle_get_intrinsic_size_in_pixels; 151 alias c_rsvg_handle_get_metadata rsvg_handle_get_metadata; 152 alias c_rsvg_handle_get_pixbuf rsvg_handle_get_pixbuf; 153 alias c_rsvg_handle_get_pixbuf_sub rsvg_handle_get_pixbuf_sub; 154 alias c_rsvg_handle_get_position_sub rsvg_handle_get_position_sub; 155 alias c_rsvg_handle_get_title rsvg_handle_get_title; 156 alias c_rsvg_handle_has_sub rsvg_handle_has_sub; 157 alias c_rsvg_handle_internal_set_testing rsvg_handle_internal_set_testing; 158 alias c_rsvg_handle_read_stream_sync rsvg_handle_read_stream_sync; 159 alias c_rsvg_handle_render_cairo rsvg_handle_render_cairo; 160 alias c_rsvg_handle_render_cairo_sub rsvg_handle_render_cairo_sub; 161 alias c_rsvg_handle_render_document rsvg_handle_render_document; 162 alias c_rsvg_handle_render_element rsvg_handle_render_element; 163 alias c_rsvg_handle_render_layer rsvg_handle_render_layer; 164 alias c_rsvg_handle_set_base_gfile rsvg_handle_set_base_gfile; 165 alias c_rsvg_handle_set_base_uri rsvg_handle_set_base_uri; 166 alias c_rsvg_handle_set_dpi rsvg_handle_set_dpi; 167 alias c_rsvg_handle_set_dpi_x_y rsvg_handle_set_dpi_x_y; 168 alias c_rsvg_handle_set_size_callback rsvg_handle_set_size_callback; 169 alias c_rsvg_handle_set_stylesheet rsvg_handle_set_stylesheet; 170 alias c_rsvg_handle_write rsvg_handle_write; 171 alias c_rsvg_cleanup rsvg_cleanup; 172 alias c_rsvg_set_default_dpi rsvg_set_default_dpi; 173 alias c_rsvg_set_default_dpi_x_y rsvg_set_default_dpi_x_y;